﻿using System;
using System.Web;
using System.Web.Mvc;

namespace Web7.Container.Controllers
{
    public class FrontController : Controller
    {
        public object Entry()
        {
            return new object();
        }

        public ViewResult NoRight()
        {
            return View();
        }

        public ActionResult LogOn()
        {
            return View();
        }
        [HttpPost]
        public ActionResult CultureChange(FormCollection formCollection)
        {
            var cultureSelect = formCollection["Choose"];
            HttpCookie cultureCookie = new HttpCookie("_culture")
            {
                Value = cultureSelect,
                Expires = DateTime.Now.AddYears(1)
            };
            System.Web.HttpContext.Current.Response.Cookies.Add(cultureCookie);

            return RedirectToRoute("Default");
            // return null;
        }
    }
}
